package es.deusto.ingenieria.sd.tralala.server;


import java.rmi.Naming;
import java.rmi.RMISecurityManager;


public class TralalaManager {

	public static void main(String[] args) {
		if (args.length != 4) {
			System.exit(0);
		}

		if (System.getSecurityManager() == null) {
			System.setSecurityManager(new RMISecurityManager());
		}

		String nameAdmin = "//" + args[0] + ":" + args[1] + "/" + args[2];
		String nameReceiver = "//" + args[0] + ":" + args[1] + "/" + args[3];

		try {
			//PlayService Play = new PlayService();
			
			//ITVProgramAdmin adminService = new TVProgramAdmin(TVProgData);			
			//Naming.rebind(nameAdmin, adminService);
			//System.out.println("* TVProgram Admin Service '" + nameAdmin + "' active and waiting...");
			
			//ITVProgramReceiver receiverService = new TVProgramReceiver(TVProgData);
			//Naming.rebind(nameReceiver, receiverService);
			//System.out.println("* TVProgram Admin Service '" + nameReceiver + "' active and waiting...");
		} catch (Exception e) {
			//System.err.println("$ TVProgramManager exception: " + e.getMessage());
			e.printStackTrace();
		}
	}
}